#define _CRT_SECURE_NO_WARNINGS 1
#pragma warning(disable:6031)

#include <stdio.h>

int main()
{
    int input = 0;
    scanf("%d", &input);
    int i = 2;
    unsigned long output = 0;
    for (int j = 0; j < input; j++)
    {
        output += i;
        i += 3;
    }
    printf("%lu", output);
    return 0;
}
